package com.kfm;

/**
 * author:hlc
 * date:2023/10/19
 */

import com.kfm.controller.TCPClient;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


/**
 * 客户端启动类
 *
 * @author 17930
 */
public class ClientStartUp {
   public static void main(String[] args) {
      Properties properties = new Properties();
      String clientPort = "", basePath="", file="",host="";
      try {
         //加载配置文件
         InputStream inputStream = ClientStartUp.class.getClassLoader().getResourceAsStream("client.properties");
         properties.load(inputStream);
         clientPort = properties.getProperty("clientPort");
         basePath = properties.getProperty("basePath");
         file = properties.getProperty("file");
         host = properties.getProperty("host");
      } catch (IOException e) {
         System.out.println("加载配置文件失败");
         e.printStackTrace();
      }
      TCPClient.sendFile(clientPort,basePath,file,host);
   }
}
